//
//  CCStringWithWidth.m
//  CwinCar
//
//  Created by dlios on 15/10/20.
//  Copyright © 2015年 dlios. All rights reserved.
//

#import "CCStringWithWidth.h"

@implementation CCStringWithWidth

+(CGFloat)WidthWithText:(NSString *)text height:(CGFloat)height font:(UIFont *)font;
{
    
    CGSize size = CGSizeMake(3000, height);
    CGRect rect = [text boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:font} context:nil];
    return rect.size.width;
}

@end
